import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";
// import { id } from 'element-plus/es/locale';

// 查询列表
export function otherList(query) {
  return request({
    url: '/pmOtherExpense/getList',
    method: 'get',
    params: query
  })
}

// 导出
export function otherExport(query) {
  return request({
    url: '/pmOtherExpense/export',
    method: 'get',
    responseType: 'blob',
    params: query
  })
}



// 新增
export function save(data) {
  return request({
    url: '/pmOtherExpense/save',
    method: 'post',
    data: data
  })
}

// 修改
export function update(id,data) {
  return request({
    url: `/pmOtherExpense/update/${id}`,
    method: 'put',
    data: data
  })
}




// 删除
export function deleteOth(id) {
  return request({
    url: `/pmOtherExpense/delete/${id}`,
    method: 'delete'
  })
}



// 提交审核
export function submitAudit(id) {
  return request({
    url: `/pmOtherExpense/submitAudit/${id}`,
    method: 'put',
  })
}
// 撤回审核
export function withdrawAudit(id) {
  return request({
    url: `/pmOtherExpense/withdrawAudit/${id}`,
    method: 'put',
  })
}

// 保存授权角色
export function updateAuthRole(data) {
  return request({
    url: '/system/user/authRole',
    method: 'put',
    params: data
  })
}


// 文件上传
export function upload(query) {
  return request({
    url: '/common/upload',
    method: 'post',
    responseType: 'blob',
    params: query
  })
}

// 费用名称
export function dict(dictType) {
  return request({
    url: '/system/dict/data/type/'+dictType,
    method: 'get',
  })
}


